﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WJP.Logging
{
    /// <summary>
    /// 日志记录器
    /// </summary>
    public interface ILogger
    {
        bool IsDebugEnabled { get; }

        bool IsInfoEnabled { get; }

        bool IsWarnEnabled { get; }

        bool IsErrorEnabled { get; }

        bool IsFatalEnabled { get; }

        /// <summary>
        /// 创建一个新的子日志记录器
        /// <para>这个子记录器名称为[当前日志记录器名称].[子日志记录器名称]</para>
        /// </summary>
        /// <param name="loggerName">这个日志记录器的子记录器名称</param>
        /// <returns></returns>
        ILogger CreateChildLogger(string loggerName);

        void Debug(string message);

        void Debug(string message, Exception exception);

        void DebugFormat(string format, params object[] args);

        void DebugFormat(Exception exception, string format, params object[] args);

        void DebugFormat(IFormatProvider formatProvider, string format, params object[] args);

        void DebugFormat(Exception exception, IFormatProvider formatProvider, string format, params object[] args);

        void Info(string message);

        void Info(string message, Exception exception);

        void InfoFormat(string format, params object[] args);

        void InfoFormat(Exception exception, string format, params object[] args);

        void InfoFormat(IFormatProvider formatProvider, string format, params object[] args);

        void InfoFormat(Exception exception, IFormatProvider formatProvider, string format, params object[] args);

        void Warn(string message);

        void Warn(string message, Exception exception);

        void WarnFormat(string format, params object[] args);

        void WarnFormat(Exception exception, string format, params object[] args);

        void WarnFormat(IFormatProvider formatProvider, string format, params object[] args);

        void WarnFormat(Exception exception, IFormatProvider formatProvider, string format, params object[] args);

        void Error(string message);

        void Error(string message, Exception exception);

        void ErrorFormat(string format, params object[] args);

        void ErrorFormat(Exception exception, string format, params object[] args);

        void ErrorFormat(IFormatProvider formatProvider, string format, params object[] args);

        void ErrorFormat(Exception exception, IFormatProvider formatProvider, string format, params object[] args);

        void Fatal(string message);

        void Fatal(string message, Exception exception);

        void FatalFormat(string format, params object[] args);

        void FatalFormat(Exception exception, string format, params object[] args);

        void FatalFormat(IFormatProvider formatProvider, string format, params object[] args);

        void FatalFormat(Exception exception, IFormatProvider formatProvider, string format, params object[] args);
    }
}
